package com.geekhalo.admin.app.user;

import com.geekhalo.admin.app.user.query.SearchUserQuery;
import com.geekhalo.admin.domain.user.query.GetByLoginName;
import com.geekhalo.lego.core.query.QueryApplicationServiceDefinition;
import com.geekhalo.lego.core.singlequery.Page;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;

import com.geekhalo.admin.domain.user.UserQueryRepository;
import com.geekhalo.admin.domain.user.UserView;

@QueryApplicationServiceDefinition(
        repositoryClass = UserQueryRepository.class,
        masterDataClass = UserView.class
)
@Validated
public interface UserQueryApplication {

    UserView get(@Valid GetByLoginName query);


    Page<UserView> pageOf(@Valid SearchUserQuery query);
}
